package one.stand.advice;

/**
 * @author Administrator
 */
public enum ResultEnum {

    IPAD_SUCCESS(0, "操作成功"),
    IPAD_FAIL(1, "系统繁忙"),
    IPAD_FAIL_LOGIN(2, "登录失败"),

    /**
     * 2xx
     */
    SUCCESS(200, "成功"),
    FAIL(201, "操作失败"),
    NO_PARAM(202, "参数缺失"),
    PARAM_CHECK(203, "参数校验失败"),
    NO_DATA(204, "无数据"),
    FILE_MAX(206, "文件过大"),
    NO_FILE(207, "文件为空"),
    NO_COMPANY(208, "未创建公司~！"),
    FREQUENTLY(209, "频繁请求"),
    NO_BOSS(210, "您没有BOSS权限"),
    ACCOUNT(211, "账号过期"),
    CARD_OVERDUE(212, "抱歉名片已过期,请联系商务充值授权"),
    NO_TOURIST(213, "未授权，无法操作"),
    DUPLICATE_KEY(214, "数据重复"),
    VERSION_LOW(215, "版本过低，请更新"),

    /**
     * 4xx
     */
    NO_LOGIN(401, "未登陆"),
    LOGIN_OUT(402, "登陆过期"),
    NO_ROLE(403, "未创建名片~！"),
    FAIL_LOGIN_BadPadding(414, "获取微信信息失败"),
    FAIL_LOGIN_WX(424, "登陆Code已过期"),
    FAIL_PHONE_NO(430, "手机号无"),
    PHONE_NOT_FOUND(431, "请先绑定手机号"),

    /**
     * 5xx
     */
    ERROR(500, "网络错误"),
    FAULT_TOLERANT(501, "网络链接失败"),
    FAULT_LOGIN_WX(502, "登录失败，请从公众号重新进入"),
    FAIL_LOGIN_ERROR(503, "登录失败"),
    ;

    private Integer code;
    private String message;

    ResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    /**
     * @return
     */
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    /**
     * @return
     */
    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
